package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.ShopingCar;
import cn.wolfcode.trip.base.query.ShopingCarQueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ShopingCarMapper {

    List<ShopingCar> selectForList(ShopingCarQueryObject qo);

    void insertRelation(ShopingCar car);

    void updateRelation(ShopingCar car);

    ShopingCar selectShopingCar(ShopingCar car);

    void deleteByProductId(@Param("userId") Long userId, @Param("productId") Long productId);

    ShopingCar getNumByUserAndProduct(@Param("userId") Long userId, @Param("productId") Long productId);

    void update(@Param("userId") Long userId, @Param("productId") Long productId, @Param("number") Integer number);
}